﻿Imports DevExpress.XtraBars.Helpers
Imports DevExpress.XtraBars.Ribbon

Public Class SG_Control_Vuelos_Main


    Private Sub BarBtnSalir_ItemClick(ByVal sender As System.Object, ByVal e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarBtnSalir.ItemClick
        Close()
    End Sub

    Private Sub AdmBarBtnManifiesto_ItemClick(ByVal sender As System.Object, ByVal e As DevExpress.XtraBars.ItemClickEventArgs) Handles AdmBarBtnManifiesto.ItemClick
        RibbonPageGroup1.Visible = False
        RibbonPageGroup2.Visible = False
        RibbonPageGroup3.Visible = False
        RibbonPageGroup4.Visible = False
        RibbonPageGroup5.Visible = False
        RibbonPageGroup6.Visible = False
        RibbonPageGroup7.Visible = False
        RibbonPageGroup9.Visible = False
        Dim sfrmMani As frmAdm_Manifiesto = New frmAdm_Manifiesto()
        sfrmMani.MdiParent = Me
        sfrmMani.Text = "Administrar Manifiesto"
        sfrmMani.BarBtnAgregar.Visibility = DevExpress.XtraBars.BarItemVisibility.Never
        sfrmMani.BarBtnEliminar.Visibility = DevExpress.XtraBars.BarItemVisibility.Never
        sfrmMani.BarBtnModificar.Visibility = DevExpress.XtraBars.BarItemVisibility.Never
        sfrmMani.BarBtnGrabar.Visibility = DevExpress.XtraBars.BarItemVisibility.Never
        sfrmMani.SLTitulo.Text = sfrmMani.Text
        sfrmMani.RibbonPage1.Visible = True
        sfrmMani.Show()
    End Sub

    Private Sub AdmBarBtnValija_ItemClick(ByVal sender As System.Object, ByVal e As DevExpress.XtraBars.ItemClickEventArgs) Handles AdmBarBtnValija.ItemClick
        RibbonPageGroup1.Visible = False
        RibbonPageGroup2.Visible = False
        RibbonPageGroup3.Visible = False
        RibbonPageGroup4.Visible = False
        RibbonPageGroup5.Visible = False
        RibbonPageGroup6.Visible = False
        RibbonPageGroup7.Visible = False
        RibbonPageGroup9.Visible = False
        Dim sfrmValija As frmAdm_ValijaLista = New frmAdm_ValijaLista()
        sfrmValija.MdiParent = Me
        sfrmValija.Text = "Lista de Valijas"
        sfrmValija.RibbonPage1.Visible = True
        sfrmValija.BarBtnAgregar.Visibility = DevExpress.XtraBars.BarItemVisibility.Never
        sfrmValija.BarBtnGrabar.Visibility = DevExpress.XtraBars.BarItemVisibility.Never
        sfrmValija.BarBtnCancelar.Visibility = DevExpress.XtraBars.BarItemVisibility.Never
        sfrmValija.SLTitulo.Text = sfrmValija.Text
        sfrmValija.Show()
    End Sub

    Private Sub AdmBarBtnVuelo_ItemClick(ByVal sender As System.Object, ByVal e As DevExpress.XtraBars.ItemClickEventArgs) Handles AdmBarBtnVuelo.ItemClick
        RibbonPageGroup1.Visible = False
        RibbonPageGroup2.Visible = False
        RibbonPageGroup3.Visible = False
        RibbonPageGroup4.Visible = False
        RibbonPageGroup5.Visible = False
        RibbonPageGroup6.Visible = False
        RibbonPageGroup7.Visible = False
        RibbonPageGroup9.Visible = False

        Dim formulario As New frmAdm_ProgramaViaje
        formulario.MdiParent = Me
        formulario.Text = "Mantenimiento de Vuelos"
        formulario.SLTitulo.Text = formulario.Text
        formulario.Show()
    End Sub

    Private Sub AdmBarBtnReserva_ItemClick(ByVal sender As System.Object, ByVal e As DevExpress.XtraBars.ItemClickEventArgs) Handles AdmBarBtnReserva.ItemClick
        RibbonPageGroup1.Visible = False
        RibbonPageGroup2.Visible = False
        RibbonPageGroup3.Visible = False
        RibbonPageGroup4.Visible = False
        RibbonPageGroup5.Visible = False
        RibbonPageGroup6.Visible = False
        RibbonPageGroup7.Visible = False
        RibbonPageGroup9.Visible = False
        Dim formulario As New frmAdm_Reserva
        formulario.MdiParent = Me
        formulario.Text = "Registro de Reservas"
        formulario.SLTitulo.Text = formulario.Text
        formulario.Show()
    End Sub

    Private Sub ConBarBtnManifiesto_ItemClick(ByVal sender As System.Object, ByVal e As DevExpress.XtraBars.ItemClickEventArgs) Handles ConBarBtnManifiesto.ItemClick
        Dim formulario As New frmConsultarManifiestoCerrado
        formulario.MdiParent = Me
        formulario.Text = "Consulta de Manifiestos "
        formulario.RibbonPage1.Text = "Consulta de Manifiestos "
        formulario.SLTitulo.Text = formulario.Text
        formulario.Show()
    End Sub

    Private Sub ConBarBtnValija_ItemClick(ByVal sender As System.Object, ByVal e As DevExpress.XtraBars.ItemClickEventArgs) Handles ConBarBtnValija.ItemClick
        Dim formulario As New frmConsultarManifiestoHistoricoValijas
        formulario.MdiParent = Me
        formulario.Text = "Consulta de Valijas "
        formulario.RibbonPage1.Text = "Consulta de Valijas"
        formulario.SLTitulo.Text = formulario.Text
        formulario.Show()
    End Sub

    Private Sub ConBarBtnViajexTrabajador_ItemClick(ByVal sender As System.Object, ByVal e As DevExpress.XtraBars.ItemClickEventArgs) Handles ConBarBtnViajexTrabajador.ItemClick
        RibbonPageGroup1.Visible = False
        RibbonPageGroup2.Visible = False
        RibbonPageGroup3.Visible = False
        RibbonPageGroup4.Visible = False
        RibbonPageGroup5.Visible = False
        RibbonPageGroup6.Visible = False
        RibbonPageGroup7.Visible = False
        RibbonPageGroup9.Visible = False
        Dim formulario As New frmConsultarViajeXTrabajador
        formulario.MdiParent = Me
        formulario.Text = "Viajes X Trabajador "
        formulario.SLTitulo.Text = formulario.Text
        formulario.Show()
    End Sub

    Private Sub SG_Control_Vuelos_Main_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        'RibbonControl.Visible = False
        Dim oDialogResult As System.Windows.Forms.DialogResult
        Dim frmLg As New frmLogin
        oDialogResult = frmLg.ShowDialog()
        If oDialogResult = System.Windows.Forms.DialogResult.OK Then
            'RibbonControl.Visible = True
            RibbonControl.MdiMergeStyle = RibbonMdiMergeStyle.OnlyWhenMaximized
            DevExpress.UserSkins.BonusSkins.Register()
            DevExpress.UserSkins.OfficeSkins.Register()
            SkinHelper.InitSkinGallery(RibbonGalleryBarItem1, True)
            SkinHelper.InitSkinPopupMenu(PopupMenu1)
        Else
            For Each ChildForm As Form In Me.MdiChildren
                ChildForm.Close()
            Next
            Global.System.Windows.Forms.Application.Exit()
            Close()
        End If

    End Sub

    Private Sub ManBarBtnLugar_ItemClick(ByVal sender As System.Object, ByVal e As DevExpress.XtraBars.ItemClickEventArgs) Handles ManBarBtnLugar.ItemClick
        RibbonPageGroup1.Visible = False
        RibbonPageGroup2.Visible = False
        RibbonPageGroup3.Visible = False
        RibbonPageGroup4.Visible = False
        RibbonPageGroup5.Visible = False
        RibbonPageGroup6.Visible = False
        RibbonPageGroup7.Visible = False
        RibbonPageGroup9.Visible = False
        Dim formulario As New frmTabla_MLugar
        formulario.MdiParent = Me
        formulario.Text = "Lugares "
        formulario.SLTitulo.Text = formulario.Text
        formulario.Show()
    End Sub

    Private Sub ManBarBtnAerolinea_ItemClick(ByVal sender As System.Object, ByVal e As DevExpress.XtraBars.ItemClickEventArgs) Handles ManBarBtnAerolinea.ItemClick
        RibbonPageGroup1.Visible = False
        RibbonPageGroup2.Visible = False
        RibbonPageGroup3.Visible = False
        RibbonPageGroup4.Visible = False
        RibbonPageGroup5.Visible = False
        RibbonPageGroup6.Visible = False
        RibbonPageGroup7.Visible = False
        RibbonPageGroup9.Visible = False
        Dim formulario As New frmTabla_MEmpresa
        formulario.MdiParent = Me
        formulario.Text = "Aerolineas "
        formulario.SLTitulo.Text = formulario.Text
        formulario.Show()
    End Sub

End Class